package com.itheima.HomeWork;

import java.util.Scanner;

public class HM04 {
 /*   键盘录入一个字符串，
    统计该字符串中大写字母字符，小写字母字符
    ，数字字符出现的次数(不考虑其他字符)
    */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s =sc.nextLine();
        int bigcount = 0;
        int smallcount = 0;
        int numcount = 0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(c>='A'&&c<='Z'){
                bigcount ++;
            }else if(c>='a'&&c<='z'){
                smallcount ++;
            }else if(c>='0'&&c<='9'){
                numcount ++;
            }
        }
        System.out.println("大写字符有"+bigcount+"个");
        System.out.println("小写字符有"+smallcount+"个");
        System.out.println("数字字符有"+numcount+"个");
    }
}
